<template>
<div>
    <PortalLayoutPreview></PortalLayoutPreview>
</div>
</template>

<script>
import useMain from "@/stores/useMain.js";
import { mapActions } from 'pinia';
import PortalLayoutPreview from "./modules/portal/PortalLayoutPreview/PortalLayoutPreview.vue";
export default {
    name: "AppHome",
    components:{
        PortalLayoutPreview
    },
    created(){
        this.init()
    },
    methods:{
        ...mapActions(useMain, ['setNavigation']),
        init(){
            let {navKey} = this.$route.meta ;
            let {from} = this.$route.query ;
            //  from ==='admin' 表示从后台返回前台
            if(navKey && navKey === 'appHome' && (!from || from !=='admin' )){
                this.setNavigation('appHome')
            }
        }
    }
}
</script>

<style scoped>

</style>
